﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Forum.Entity.Board;

using Forum.DAL.Board;
using Forum.BLL.Post;
using Frame.Lib.Core.Tree;

namespace Forum.BLL.Board
{
    public class BoardBO : TreeBO<BoardInfo>
    {
        private BoardDAL _forumBoard;
        public BoardBO()
            : base(Forum.DAL.TableName.Board)
        {
            _forumBoard = new BoardDAL();
        }

        public override BoardInfo GetInfo(object id)
        {
            BoardInfo info = base.GetInfo(id);
            info.GetTitleTypes = boardID => (new TopicTypeBO()).GetList(boardID.ToString());
            return info;
        }

        public override List<BoardInfo> GetList()
        {
            List<BoardInfo> list = _forumBoard.GetList();
            return list;
        }
    }
}
